refactor(home): 홈 프리뷰 수정, 로고 교체 및 썸네일 디버깅 로그#113
Merged
Merged
Conversation
- `FuneralVideoUpload` 컴포저블에 동영상 URL, 썸네일 URL, 동영상 존재 여부, 비트맵 상태 등의 변화를 추적하는 `LaunchedEffect` 로그를 추가하여 컴포넌트의 상태 변화를 명확히 파악할 수 있도록 했습니다. - `SideEffect`를 사용하여 각 분기(원격 URL 썸네일, 로컬 비트맵 썸네일, 썸네일 없음)가 실행될 때마다 로그를 남겨, 어떤 조건으로 썸네일이 렌더링되는지 실시간으로 확인할 수 있게 했습니다. - Coil 이미지 로딩 라이브러리의 `onLoading`, `onSuccess`, `onError` 콜백에 로그를 추가하여 원격 썸네일 이미지의 로딩 시작, 성공, 실패 과정을 추적할 수 있도록 개선했습니다. - 썸네일 로딩 실패 시 표시되는 플레이스홀더 이미지를 기존 `ic_add_circle`에서 `img_placeholder_1`로 변경했습니다.
- `HomeScreen`과 `RecordMainScreen`의 `TopBar`를 `Column` 내부에서 `Scaffold`의 `topBar` 슬롯으로 이동시켜 레이아웃 구조를 개선했습니다. - `HomeScreen`의 `@Preview`가 Hilt ViewModel에 의존하지 않도록 `ProfileViewModel`과 `MindRecordViewModel`의 Contract(인터페이스)를 정의하고, 프리뷰용 Fake ViewModel 구현체를 추가했습니다. - 설정 아이콘 리소스를 `png` 형식에서 벡터 드로어블(`xml`)로 교체했습니다. - `MindRecordViewModel`에서 날짜 파싱 실패 시 `getOrElse` 대신 `getOrNull`을 사용하도록 코드를 개선했습니다.
- 홈 화면의 상단 로고를 기존 `logo_blue` 이미지에서 새로운 벡터 드로어블인 `ic_home_topbar_logo`로 교체했습니다. - 로고 교체에 따라 더 이상 사용되지 않는 `onProfileClick` 파라미터를 `HomeHeader` 컴포저블과 관련 호출부에서 제거했습니다.
- `HomeScreen`의 인사말 상단에 `24.dp` 높이의 `Spacer`를 추가하여 상단 여백을 조정했습니다. - 가독성 향상을 위해 `FakeHomeEvent`와 `FakeMindRecordHomeViewModel` 내 메서드 사이에 공백 라인을 추가했습니다.
- `AuthInterceptor`에서 여러 API 요청이 동시에 401 오류를 반환했을 때, 토큰 재발급 API(`auth/reissue`)가 여러 번 호출되는 경쟁 상태(race condition) 문제를 해결했습니다. - `synchronized` 블록과 double-check locking 패턴을 적용하여, 여러 스레드가 동시에 토큰 재발급을 시도하더라도 단 하나의 스레드만 실제 재발급을 실행하도록 보장합니다. - 재발급이 진행되는 동안 대기하던 다른 스레드들은, 재발급이 완료된 후 새로 저장된 액세스 토큰을 사용하여 원래의 요청을 재시도합니다. - 동기화를 위해 프로세스 전역에서 사용될 `refreshTokenLock` 객체를 `companion object` 내에 추가했습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
목적 / 배경
변경 사항 요약
주요 수정 파일
feature/home/presentation/screen/HomeScreen.ktfeature/dailyrecord/presentation/viewmodel/MindRecordViewModel.ktfeature/afternote/presentation/component/edit/upload/FuneralVideoUpload.kt테스트/검증
./gradlew ktlintCheck,./gradlew :app:compileDebugKotlin통과Made with Cursor